<?php
/**
 * 获取banner信息
 *
 * User: yaosj
 * Date: 15-10-13
 * Time: 下午12:00
 */

class GetBanner implements iController
{

    public function output($queryArgs)
    {
        global $uddb;
        $sql = 'SELECT banner_pic,link_url FROM web_major_banner_info WHERE is_activated = 1 ORDER BY id DESC';
        $result = $uddb -> getRow($sql);
        if (empty($result)) return genOutput(1);

        $result->banner_pic = getSecureUrl($result->banner_pic);

        return genOutput(1,array('data' => $result));
    }
}